\chapter{The \headset PathCreator}
The PathCreator application is used to visualize medical data from DICOM images in 3D, and to specify the areas within the generated model that indicate a tumour and a safe area for surgery. Its main tools are importing DICOM information and specifying areas by adding and modifying 3D primitives.

\section{Importing medical DICOM data}
To import medical data from the DICOM file format, choose \textbf{File -> Import DICOM Image...} or press \textbf{CTRL + I} (Mac users should use \textbf{Command + I}). If a folder was selected that contains valid DICOM data, a window will be displayed where import settings can be altered. These settings will be explained below:

\begin{description}
\item[Extract] This value determines how hard a material has to be before it is visualized in the 3D model. High values will show harder materials, low values show only softer materials.
\item[Reduction] This value determines the amount of detail in the generated 3D model. With reduction set to 0, all information that can be extracted from the DICOM data will be shown. With reduction set to higher values, the amount of polygons in the generated model will be reduced to improve performance. A high reduction value still provides good results.
\item[Smoother iterations] This value determines how many times the generated model will be smoothened when generated. More iterations will generate a model with smoother surfaces and less ragged edges. It is advisable to use a high number of smoother iterations when using a high reduction value.
\item[Colour] This option sets the colour of the generated model.
\item[Opacity] This value determines the opacity of the generated model. In order to see primitives placed inside the model, at least some degree of transparency is advisable.
\end{description}

When the OK button is pressed, the model will be generated. This can take up to a few minutes on slower systems.

\begin{figure}[ht!]
\centering
\includegraphics[width=0.55\textwidth]{images/dicom.png}
\caption{The DICOM import window}
\end{figure}
\FloatBarrier

\section{Modeling}
In order to indicate the areas belonging to either a tumour or a safe path, \headset allows you to place and manipulate primitive 3D shapes. These shapes are box, ellipsoid, cylinder and cone.

\subsubsection{Adding primitives}
In order to add a primitive, in the \textbf{Adding primitives} section, select the tab for either tumour or safe path and select the desired shape by clicking the corresponding button. The selected shape will be placed in the centre of the current 3D space. Shapes belonging to the tumour category will be displayed in red, those belonging to the safe path category will be displayed in green.

\begin{figure}[ht!]
\centering
\includegraphics[width=0.3\textwidth]{images/add_prim.png}
\caption{Adding primitives}
\end{figure}
\FloatBarrier

\subsubsection{Selecting primitives}
In order to select a primitive, there are two options. The first option is to left-click the primitive directly in the 3D view. The second option is to find the primitive in the \textbf{Model Information} tab, and left-click on its name. Once a primitive is selected, a manipulation tool is drawn around it in the 3D view and the controls in the \textbf{Positioning primitives} section are enabled.\\
In order to deselect the current primitive, either left-click in an empty area in the 3D view or click the \textbf{Clear selection} button in the bottom of the screen.

\begin{figure}[ht!]
\centering
\includegraphics[width=0.3\textwidth]{images/list_prim.png}
\caption{The Model Information tab}
\end{figure}
\FloatBarrier

\subsubsection{Modifying primitives}
In order to make the primitives suit your needs, they can be manipulated in several ways. These are described here:

\begin{description}
\item[Scaling] The easiest way to change the scale of a primitive is to drag the circular handles on the manipulation tool in the 3D view. It is also possible to change the scale by using the \textbf{Scale} tab in the \textbf{Positioning primitives} section. For the first option one has to left-click and hold the right mouse button down on the selected primitive and move the mouse in order to scale it equally in all directions.
\item[Moving] This can be done by clicking and dragging the middle mouse button on the selected primitive. It is also possible to click and drag the centre handle of the manipulation tool in the 3D view. Another way is to use the \textbf{Move To} tab in the \textbf{Positioning primitives} section and change the values.
\item[Rotating] In order to rotate a primitive, left-click and drag one of the sides of the manipulation tool in the 3D view. Alternatively the \textbf{Rotate} tab of the \textbf{Positioning primitives} section can be used.
\item[Cloning] The currently selected primitive can be cloned by using the \textbf{Clone selection} button in the bottom of the screen. The cloned primitive will appear in the same location with the same attributes.
\item[Deleting] In order to delete a selected primitive, either use the \textbf{Delete selection} button in the bottom of the screen, or press the \textbf{Delete} key on the keyboard.
\end{description}

\begin{figure}[ht!]
\centering
\includegraphics[width=0.3\textwidth]{images/pos_prim.png}
\caption{The Positioning primitives section}
\end{figure}
\FloatBarrier
